#pragma once

#include <vector>
#include "IEvent.h"
#include "GUIShape.h"
#include "Pointer.h"
#include "Point.h"
#include "Matrix.h"

class IGUIElement
{
public:
	typedef std::vector<Pointer<IGUIElement>> Vector_t;
	
	IGUIElement();

	virtual void Paint() = 0;
	virtual void ParentLocation( Maths::Point<unsigned int>& location );
	virtual bool ReceiveEvent( IEvent& event ) = 0;
	virtual void Location( Maths::Point<unsigned int>& location );
	virtual Maths::Point<unsigned int> Location() const;
	virtual void Dimensions( Maths::Point<unsigned int>& dimensions );
	virtual Maths::Point<unsigned int> Dimensions() const;
	virtual void Parent( IGUIElement* element );
	bool Visible() const;
	void Visible( bool visible );
	bool Enabled() const;
	void Enabled( bool enabled );
	void ActiveObject( IGUIElement* element );
	IGUIElement* ActiveObject() const;
protected:
	static GUIShape m_shape;
	bool m_visible;
	bool m_enabled;
	static IGUIElement* m_activeElement;
	Maths::Point<unsigned int> m_location;
	Maths::Point<unsigned int> m_parentLocation;
	Maths::Point<unsigned int> m_dimensions;
	IGUIElement* m_parent;
};